package com.dp.mallchat.common.common.domain.enums;

import com.dp.mallchat.common.common.exception.ErrorEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum CommonErrorEnum implements ErrorEnum {

    SYSTEM_ERROR(-1, "系统异常"),
    PARAM_VALID(-2, "参数校验失败{0}"),
    BUSINESS_ERROR(1001, "{0}"),
    LOCK_OUT_TIME(1002, "请求太频繁了，请稍后再试哦~~"),
    ;

    private Integer code;
    private String message;


    @Override
    public Integer getErrorCode() {
        return code;
    }

    @Override
    public String getErrorMsg() {
        return message;
    }
}
